
package threads.collaboration;

public class ResultWrapper implements Comparable<ResultWrapper>
{

	private Integer number;

	private String resultString;
	
	
	public Integer getNumber()
	{
		return number;
	}


	public void setNumber(Integer number)
	{
		this.number = number;
	}



	public String getResultString()
	{
		return resultString;
	}



	public void setResultString(String resultString)
	{
		this.resultString = resultString;
	}

	@Override
	public String toString()
	{
		
		return this.getClass().getSimpleName() + " with number=" + number;
	}


	@Override
	public int compareTo(ResultWrapper resultWrapper)
	{

		if (number > resultWrapper.number)
		{
			return -1;
		}
		else if (number < resultWrapper.number)
		{
			return 1;
		} 
		else
		{
		return 0;
		}
	}

}
